<template>
	<view class="container">
		<dropDown class="top" :modelValue="mVal" :dropTabList="dropTabList"></dropDown>
		<view class="list">
			<view class="item" v-for="(item,i) in 6" :key="i">
				<view class="left">
					<view class="img-box">
						<image :src="$img_path('/mall/5.png')" mode="aspectFill"></image>
						<view class="yuan"></view>
					</view>
					<view class="info">
						<view class="name">
							李四（12345678910）
						</view>
						<view class="pf">
							服务评分：<text>95.0</text>
						</view>
					</view>
				</view>
				<view class="right">
					<text> {{'<200m'}} </text>
					<button @click="selectUser">指派</button>
				</view>
			</view>
		</view>
		
		<popupBox ref="confrimBox" contentBG="#ffffff">
			<view class="popup-con">
				<view class="title">
					提示
				</view>
				<view class="c-text">
					你确定指派“李四”服务者？
				</view>
			</view>
		</popupBox>
	</view>
</template>

<script>
	import popupBox from '@/components/popup/popup.vue'
	import dropDown from '@/components/drop/drop.vue'
	export default {
		components:{
			dropDown,
			popupBox
		},
		data() {
			return {
				mVal:{
					juli:'',
					status:''
				},
				dropTabList:[
					{
						props:'juli',
						text:'',
						list:[
							{
								text:'附近',
								value:''
							},
							{
								text:'1km',
								value:'1'
							},
							{
								text:'2km',
								value:'2'
							},
							{
								text:'3km',
								value:'3'
							},
							{
								text:'5km',
								value:'5'
							},
							{
								text:'10km',
								value:'10'
							},
						]
					},
					{
						props:'status',
						text:'',
						list:[
							{
								text:'全部',
								value:''
							},
							{
								text:'空闲中',
								value:'1'
							},
							{
								text:'服务中',
								value:'2'
							},
						]
					},
				]
			};
		},
		methods:{
			selectUser(){
				this.$refs.confrimBox.open()
			}
		}
	}
</script>

<style>
	page{
		background-color: #FFFFFF;
	}
</style>
<style lang="scss" scoped>
.container{
	.top{
		position: sticky;
		top: 0;
	}
	.list{
		.item{
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 34rpx 30rpx 34rpx 32rpx;
			box-sizing: border-box;
			border-bottom: 2rpx solid #EEEEEE;
			.left{
				display: flex;
				align-items: center;
				.img-box{
					width: 116rpx;
					height: 116rpx;
					position: relative;
					image{
						width: 100%;
						height: 100%;
						border-radius: 50%;
					}
					.yuan{
						width: 28rpx;
						height: 28rpx;
						position: absolute;
						right: 0;
						bottom: 0;
						background-color: #B4B4B4;
						border-radius: 50%;
					}
				}
				
				.info{
					padding-left: 20rpx;
					.name{
						font-weight: bold;
						font-size: 28rpx;
						color: #000000;
						line-height: 40rpx;
					}
					.pf{
						font-weight: 400;
						font-size: 26rpx;
						color:#464646;
						line-height: 36rpx;
						margin-top: 20rpx;
						text{
							color: #FFA33A;
						}
					}
				}
				
			}
			.right{
				display: flex;
				flex-direction: column;
				align-items: flex-end;
				text{
					font-weight: 400;
					font-size: 28rpx;
					color: #B4B4B4;
					line-height: 40rpx;
				}
				button{
					width: 136rpx;
					height: 52rpx;
					background: linear-gradient( 90deg, #FFA233 0%, #FB4C4C 100%);
					border-radius: 8rpx;
					font-weight: 400;
					font-size: 28rpx;
					color: #FFFFFF;
					line-height: 52rpx;
					margin-top: 14rpx;
				}
			}
		}
	}
}
.popup-con{
	.title{
		text-align: center;
		font-weight: bold;
		font-size: 36rpx;
		color: #000000;
		line-height: 50rpx;
		padding: 28rpx 0 70rpx;
	}
	.c-text{
		font-weight: bold;
		font-size: 36rpx;
		color: #000000;
		line-height: 50rpx;
		padding-bottom: 66rpx;
	}
}
</style>
